   package org.yoyo.classroom.domain.po;

   import lombok.Data;

   @Data
   public class ValidationResult {
       private boolean success;
       private String message;

       private ValidationResult(boolean success, String message) {
           this.success = success;
           this.message = message;
       }

       public static ValidationResult success() {
           return new ValidationResult(true, null);
       }

       public static ValidationResult error(String message) {
           return new ValidationResult(false, message);
       }

       public boolean isSuccess() {
           return success;
       }

       public String getMessage() {
           return message;
       }
   }
   